package com.example.onlineeducation.data.model

import android.os.Parcelable
import androidx.recyclerview.widget.DiffUtil
import kotlinx.android.parcel.Parcelize

@Parcelize
data class RegisterSearchProjectListDataModel(
    var proId: String?,
    var proName: String?
    ) : Parcelable {

    companion object {
        val diffCallback = object : DiffUtil.ItemCallback<RegisterSearchProjectListDataModel>() {
            override fun areItemsTheSame(
                oldItem: RegisterSearchProjectListDataModel,
                newItem: RegisterSearchProjectListDataModel
            ): Boolean {
                return oldItem.proId == newItem.proId
            }

            override fun areContentsTheSame(
                oldItem: RegisterSearchProjectListDataModel,
                newItem: RegisterSearchProjectListDataModel
            ): Boolean {
                return oldItem.proId == newItem.proId
                        && oldItem.proName == newItem.proName

            }
        }
    }
}